package com.example.shipyi.controller;

import com.example.shipyi.bean.BlogProperties;
import com.example.shipyi.bean.TestConfigBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@Controller
public class IndexController {
    @Autowired
    private BlogProperties blogProperties;
    @Autowired
    private TestConfigBean testConfigBean;

    @RequestMapping("/")
    @ResponseBody
    String index() {
        return blogProperties.getName();
    }
    @RequestMapping("/test")
    @ResponseBody
    String test(){
        return testConfigBean.toString();
    }
}
